oracle.pg.nosql

## Class VertexCache

- java.lang.Object
- - oracle.pg.nosql.CommonCache
  - - oracle.pg.nosql.VertexCache

-     public class VertexCache
      extends CommonCache

  This class implements a cache layer for OracleVertex objects. Note that by design each graph will have its own verticies cache.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearCache()` This method empties the cache
    `void` | `dumpStatistics(PrintStream ps)` Print out the statistics collected.
    `OracleVertex` | `get(Long lID)` Fetch one vertex from the cache using its ID.
    `static VertexCache` | `getInstance(OraclePropertyGraph opg)` This method returns an instance of VertexCache.
    `void` | `put(Long lID, OracleVertex v)` Add one vertex to the cache.
    `void` | `put(OracleVertex v)` Add one vertex to the cache
    `OracleVertex` | `remove(Long lID)` Remove one Vertex from the cache
    `OracleVertex` | `remove(OracleVertex v)` Remove one Vertex from the cache

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### clearCache

          public void clearCache()

      This method empties the cache

    - #### dumpStatistics

          public void dumpStatistics(PrintStream ps)

      Print out the statistics collected.

    - #### get

          public OracleVertex get(Long lID)

      Fetch one vertex from the cache using its ID. If the vertex is not in the cache, then return NULL.

    - #### getInstance

          public static VertexCache getInstance(OraclePropertyGraph opg)

      This method returns an instance of VertexCache. Note that there is a 1:1 mapping between property graph names and VertexCache objects

    - #### put

          public void put(Long lID,
                 OracleVertex v)

      Add one vertex to the cache. TODO: avoid two separate calls to this API with the same IDs but different vertices.

    - #### put

          public void put(OracleVertex v)

      Add one vertex to the cache

    - #### remove

          public OracleVertex remove(Long lID)

      Remove one Vertex from the cache

    - #### remove

          public OracleVertex remove(OracleVertex v)

      Remove one Vertex from the cache

Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.